define script AdvisorCommentary
define script ProgressCommentary
define script ProcessObjectives

begin script Land3ShortTutorial

start
    // Get the town
    if not L3GreekTown exists
        run script Land3Globals
    end if

    // delete the scrolls
	delete L3TutorialsScroll
	delete L3ShortTutorialScroll

    // Play dialogue and cutscenes
	begin dialogue
		eject good spirit
		eject evil spirit
        // This land looks quiet. Deserted, even. No-one's been here for ages.
        say "BW2T_SCRIPT_03FINAL_ADVISORS_INTRO_30"
        wait until read
        // Well this is our place now! But we gotta rebuild our tribe, Boss.
        say "BW2T_SCRIPT_03FINAL_ADVISORS_INTRO_40"
        wait until read
        // So Leader, you should aim to take over the other Towns on this land.
        say "BW2T_SCRIPT_03FINAL_PLAYTHROUGH29_420"
        wait until read
        // You can do this by impressing them with the size and happiness of our Town.
        say "BW2T_SCRIPT_03FINAL_PLAYTHROUGH29_430"
        wait until read
        // Or by getting troops together and taking over their Town Centers.
        say "BW2T_SCRIPT_03FINAL_PLAYTHROUGH29_440"
        wait until read
        // Taking these Towns are important objectives, you see.
        say "BW2T_SCRIPT_03FINAL_PLAYTHROUGH29_450"
        wait until read
        // Just make sure everyone is well fed and housed.
        say "BW2T_SCRIPT_03FINAL_ADVISORS_TUT_894"
        wait until read
		send good spirit home
        // Hey. Our Creature's waking up!
		say "BW2T_SCRIPT_03FINAL_PLAYTHROUGH29_380"
		wait until read
		send evil spirit home
    end dialogue

	L3CreatureSleeping = CT_False
	
	L3TimeForCreatureToWake = 1

	
	set fade red 0 green 0 blue 0 time 1
	wait 1 seconds
	begin cinema
		start music "cut_scene_happy_02"
		set MyCreature position to {1140.992, 363.662, 1537.468}
		snap creature MyCreature focus to {1142.272, 376.357, 1535.856}
		set MyCreature focus to {1142.272, 376.357, 1535.856}
		wait 0.1 seconds
		
		play anim C_STATIC_SLEEP on MyCreature loop -1
	
		wait 2 seconds
		set camera position to {1142.272, 376.357, 1535.856}
		set camera focus to {1206.053, 365.324, 1459.624}
		move camera position to {1136.016, 371.272, 1543.007} time 15
		move camera focus to {1179.144, 298.759, 1489.320} time 15
		set fade in time 2
		wait 5 seconds
		
		move camera position to {1134.505, 373.812, 1544.888} time 12
		move camera focus to {1177.633, 301.300, 1491.201} time 12
		play anim C_STATIC_END_SLEEP on MyCreature 
		wait until MyCreature played
		set MyCreature focus to {1127.513, 381.057, 1554.081}
		wait until creature MyCreature finished script action
		
		
		play anim C_INDIVIDUAL_TIRED2 on MyCreature 
		wait until MyCreature played
		wait until camera ready
		stop music with fadetime 4
	end cinema
    // enable creature
	release MyCreature
    enable leash on MyCreature
	enable creature icon visible
	disable MyCreature indestructible

	// enable the villagers to do stuff
	enable town L3GreekTown job VILLAGER_JOB_MINER
	enable town L3GreekTown job VILLAGER_JOB_BUILDER
	enable town L3GreekTown job VILLAGER_JOB_FARMER
	enable town L3GreekTown job VILLAGER_JOB_FORESTER

	// enable the migrations
	enable migration from L3MinorTown1 to all other towns
	enable migration from L3MinorTown2 to all other towns
	enable migration from L3MinorTown3 to all other towns
	enable migration from L3MinorTown4 to all other towns
	disable script controlled migration player 0
	
	// enable town takeover
	enable town L3MinorTown1 can be taken by force
	enable town L3MinorTown2 can be taken by force
	enable town L3MinorTown3 can be taken by force
	enable town L3MinorTown4 can be taken by force

    // enable town desires
    set town L3GreekTown desire for TOWN_DESIRE_TO_BUILD to -1
    set town L3GreekTown desire for TOWN_DESIRE_TO_BREED to -1
    set town L3GreekTown desire for TOWN_DESIRE_FOR_SPARE_TIME to -1
    set town L3GreekTown desire for TOWN_DESIRE_FOR_FOOD to -1
    set town L3GreekTown desire for TOWN_DESIRE_FOR_HOMES to -1

    // Enable jobs
	enable town L3GreekTown job VILLAGER_JOB_MINER
	enable town L3GreekTown job VILLAGER_JOB_BUILDER
	enable town L3GreekTown job VILLAGER_JOB_FARMER
	enable town L3GreekTown job VILLAGER_JOB_FORESTER
	enable disciple placedown speech

    //Enable other things
    disable build menu override
	enable game can be lost
	enable toolbar
	enable can use destruction tool
    enable interface action MANACOST_BALANCE_TYPE_GODBUILD
    run background script BT_SetEverythingToHowItShouldBe
    TUT_FedTheVillagers = TUT_TRUE
    TUT_FinishedTutorials = TUT_TRUE

    // Reset objectives
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_1
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_2
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_3
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_4
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_5
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_6
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_7
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_8
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_9
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_10 
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_11
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_12
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_13
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_14
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_15
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_16
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_18
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_19
	reset player 0 objective TRIBUTE_OBJECTIVE_LAND_20

	// Setup the objective for taking over the other towns by force or imprssiveness
	// Take over every Town on the land.
	enable objective window
	set player 0 objective TRIBUTE_OBJECTIVE_SCRIPT_CONTROLLED_WIN_LAND with amount 1 text "BW2T_SCRIPT_07FINAL_SECONDARYOBJECTIVE_80" amount 1 description "BW2T_SCRIPT_06FINAL_SECONDARYOBJECTIVE_51" start value 0 force open
	set player 0 objective TRIBUTE_OBJECTIVE_LAND_11 with amount 1 text "BW2T_SCRIPT_08FINAL_SECONDARYOBJECTIVE_70" parent TRIBUTE_OBJECTIVE_SCRIPT_CONTROLLED_WIN_LAND start value 0 force open
	set player 0 objective TRIBUTE_OBJECTIVE_LAND_12 with amount 2000 text "BW2T_SCRIPT_01FINAL_OBJECTIVE_L3_TUTORIALS_05" amount 2000 description "BW2T_SCRIPT_03FINAL_SECONDARYOBJECTIVE_21" class TRIBUTE_OBJECTIVE_CLASS_RESOURCES reward GLOBAL_VALUE_TRIBUTE_LAND_3_FEEDVILLAGERSTUTORIAL
	set player 0 objective TRIBUTE_OBJECTIVE_LAND_13 with amount 2000 text "BW2T_SCRIPT_01FINAL_OBJECTIVE_L3_TUTORIALS_30" amount 2000 description "BW2T_SCRIPT_03FINAL_SECONDARYOBJECTIVE_11" class TRIBUTE_OBJECTIVE_CLASS_RESOURCES reward GLOBAL_VALUE_TRIBUTE_LAND_3_ADDWOODTUTORIAL
	set player 0 objective TRIBUTE_OBJECTIVE_LAND_14 with amount 2000 text "BW2T_SCRIPT_09FINAL_OBJECTIVES_10" amount 2000 description "BW2T_SCRIPT_09FINAL_OBJECTIVES_10" class TRIBUTE_OBJECTIVE_CLASS_RESOURCES reward GLOBAL_VALUE_TRIBUTE_LAND_3_ROADTUTORIAL
	set player 0 objective TRIBUTE_OBJECTIVE_MAKE_FARMER_DISCIPLES with amount 3 text "BW2T_SCRIPT_01FINAL_OBJECTIVE_L3_TUTORIALS_20" amount 3 description "BW2T_SCRIPT_03FINAL_OBJECTIVE_NEUTRAL_71" reward GLOBAL_VALUE_TRIBUTE_LAND_3_FEEDVILLAGERSTUTORIAL
	set player 0 objective TRIBUTE_OBJECTIVE_MAKE_FORESTER_DISCIPLES with amount 3 text "BW2T_SCRIPT_01FINAL_OBJECTIVE_L3_TUTORIALS_40" amount 3 description "BW2T_SCRIPT_03FINAL_OBJECTIVE_NEUTRAL_81" reward GLOBAL_VALUE_TRIBUTE_LAND_3_DESCIPLEFORESTERTUTORIAL
	set player 0 objective TRIBUTE_OBJECTIVE_MAKE_BUILDER_DISCIPLES with amount 3 text "BW2T_SCRIPT_01FINAL_OBJECTIVE_L3_TUTORIALS_60" amount 3 description "BW2T_SCRIPT_03FINAL_PDMRON_PICKUP118" reward GLOBAL_VALUE_TRIBUTE_LAND_3_DESCIPLEBUILDERTUTORIAL
	set player 0 objective TRIBUTE_OBJECTIVE_MAKE_BREEDER_DISCIPLES with amount 3 text "BW2T_SCRIPT_01FINAL_OBJECTIVE_L3_TUTORIALS_70" amount 3 description "BW2T_SCRIPT_03FINAL_SECONDARYOBJECTIVE_41" reward GLOBAL_VALUE_TRIBUTE_LAND_3_DESCIPLEBREEDERTUTORIAL
	set player 0 objective TRIBUTE_OBJECTIVE_MAKE_MINER_DISCIPLES with amount 3 text "BW2T_SCRIPT_06FINAL_OBJECTIVE_NEUTRAL_101" amount 3 description "BW2T_SCRIPT_03FINAL_OBJECTIVE_NEUTRAL_61" reward GLOBAL_VALUE_TRIBUTE_LAND_3_TIMEOFDAYTUTORIAL
	set player 0 objective TRIBUTE_OBJECTIVE_ACHIEVE_POPULATION with amount 75 text "BW2T_SCRIPT_06FINAL_OBJECTIVE_NEUTRAL_70" amount 75 description "BW2T_SCRIPT_03FINAL_OBJECTIVE_PRIMARY_NEUTRAL_21" reward GLOBAL_VALUE_TRIBUTE_LAND_3_INCREASEPOPULATION
	set player 0 objective TRIBUTE_OBJECTIVE_ACHIEVE_POPULATION value size of L3GreekTown
	set player 0 objective TRIBUTE_OBJECTIVE_LAND_15 with amount 12 text "BW2T_SCRIPT_01FINAL_OBJECTIVE_L3_TUTORIALS_50" amount 12 description "BW2T_SCRIPT_03FINAL_SECONDARYOBJECTIVE_31" class TRIBUTE_OBJECTIVE_CLASS_TOWN reward GLOBAL_VALUE_TRIBUTE_LAND_3_BUILDHOUSESTUTORIAL
	set player 0 objective TRIBUTE_OBJECTIVE_LAND_16 with amount 1 text "BW2T_SCRIPT_03FINAL_OBJECTIVES_TEMPLE_10" amount 1 description "BW2T_INTERFACE_TOOLTIP_TOOLBAR_BUILDINGS_TEMPLE" class TRIBUTE_OBJECTIVE_CLASS_TOWN reward 5000
	set player 0 objective TRIBUTE_OBJECTIVE_LAND_17 with amount 1 text "BW2T_SCRIPT_03FINAL_OBJECTIVES_ARMY_10" amount 1 description "BW2T_INTERFACE_TOOLTIP_TOOLBAR_BUILDINGS_ARMOURY_MELEE" class TRIBUTE_OBJECTIVE_CLASS_ARMY reward 5000
	set player 0 objective TRIBUTE_OBJECTIVE_CREATE_PLATOONS with amount 1 text "BW2T_SCRIPT_03FINAL_OBJECTIVES_ARMY_20" amount 1 description "BW2T_SCRIPT_06FINAL_OBJECTIVE_EVIL_30" reward GLOBAL_VALUE_TRIBUTE_LAND_3_BUILDTABTUTORIAL3

    // Handle flavor dialogue
    run background script AdvisorCommentary
    run background script ProgressCommentary
	run background script ProcessObjectives

end script Land3ShortTutorial

begin script AdvisorCommentary

FoodCheck = 0
FarmerCheck = 0
WoodCheck = 0
ForesterCheck = 0
OreCheck = 0
MinerCheck = 0
BreederCheck = 0
BuilderCheck = 0
PopulationCheck = 0
HousesCheck = 0
HandForcingCheck = 0
MultipickupCheck = 0
TempleCheck = 0
ArmoryCheck = 0
BothReady = 0
ArmyCheck = 0
BuildRoad = 0
pastroadtotal = 0

start

    pastroadtotal = get total of stat STATS_EVT_BUILDINGS_BUILT_ROAD
    while L3NumTownsOwnedByPlayer != 4

        if FoodCheck == 0 and get resource RESOURCE_TYPE_FOOD in TUT_StoragePit >= 2000
            begin dialogue
				eject good spirit
                // Excellent work, Leader. You've already given the villagers enough food for now.
				say "BW2T_SCRIPT_03FINAL_ADVISORS_TUT_846"
				wait until read
				send good spirit home
			end dialogue
            FoodCheck = 1
        end if

        if FarmerCheck == 0 and get number of disciples VILLAGER_DISCIPLE_FARMER in town L3GreekTown >= 3
            begin dialogue
				eject evil spirit
                // Those farmers can handle that small field with no problem, Boss.
				say "BW2T_SCRIPT_03FINAL_DISCIPLETUTORIAL_MADETHREEFARMERS_10"
				wait until read
                // We need to get a good supply of food going or we won't be able to create enemy-crushing armies.
                say "BW2T_SCRIPT_03FINAL_DISCIPLETUTORIAL_INTRO_30"
                wait until read
				send evil spirit home
			end dialogue
            FarmerCheck = 1
        end if

        if WoodCheck == 0 and get resource RESOURCE_TYPE_WOOD in TUT_StoragePit >= 2000
            begin dialogue
				eject good spirit
                // The Storehouse is well stocked with wood, Leader. Well done.
				say "BW2T_SCRIPT_03FINAL_ADVISORS_TUT_836"
				wait until read
				send good spirit home
			end dialogue
            WoodCheck = 1
        end if

        if ForesterCheck == 0 and get number of disciples VILLAGER_DISCIPLE_FORESTER in town L3GreekTown >= 3
            begin dialogue
				eject evil spirit
                // We've got some nifty foresting going on, Boss.
				say "BW2T_SCRIPT_03FINAL_ADVISORS_TUT_908"
				wait until read
				send evil spirit home
			end dialogue
            ForesterCheck = 1
        end if

        if OreCheck == 0 and get resource RESOURCE_TYPE_ORE in TUT_StoragePit >= 2000
            begin dialogue
				eject evil spirit
                // Ore! And loads of it! We can build masses of troops with this.
				say "BW2T_SCRIPT_10FINAL_ADVISORS_OBJECTIVES"
				wait until read
				send evil spirit home
			end dialogue
            OreCheck = 1
        end if

        if MinerCheck == 0 and get number of disciples VILLAGER_DISCIPLE_MINER in town L3GreekTown >= 3
            begin dialogue
				eject good spirit
                // It looks like you've got the hang of creating Disciples.
				say "BW2T_SCRIPT_03FINAL_ADVISORS_TUT_868"
				wait until read
				send good spirit home
			end dialogue
            MinerCheck = 1
        end if

        if BreederCheck == 0 and get number of disciples VILLAGER_DISCIPLE_BREEDER in town L3GreekTown >= 3
            begin dialogue
				eject evil spirit
                // It's how Cupid does it. It's god creating true love on the planet.
				say "BW2T_SCRIPT_03FINAL_ADVISORS_TUT_350"
				wait until read
				eject good spirit
                // Ahh, there is no greater gift than that of new life.
                say "BW2T_SCRIPT_08FINAL_ADVISORS_SECONDARYOBJECTIVE_RESPONSE_50"
				wait until read
				send evil spirit home
				send good spirit home
			end dialogue
            BreederCheck = 1
        end if

        if BuilderCheck == 0 and get number of disciples VILLAGER_DISCIPLE_BUILDER in town L3GreekTown >= 3
            begin dialogue
				eject good spirit
                // Your villagers are building away.
				say "BW2T_SCRIPT_03FINAL_ADVISORS_TUT_849"
				wait until read
				send good spirit home
			end dialogue
            BuilderCheck = 1
        end if

        if PopulationCheck == 0 and size of L3GreekTown >= 75
            begin dialogue
				eject good spirit
                //Your population is increasing nicely .
				say "BW2T_SCRIPT_03FINAL_ADVISORS_TUT_874"
				wait until read
				send good spirit home
			end dialogue
            PopulationCheck = 1
        end if

        if HousesCheck == 0 and get number of built ABODE_NUMBER_C in L3GreekTown >= 12
            begin dialogue
				eject good spirit
                //Wow you've already built enough houses leader. Amazing!
				say "BW2T_SCRIPT_03FINAL_ADVISORS_TUT_854"
				wait until read
				send good spirit home
			end dialogue
            HousesCheck = 1
        end if

        if HandForcingCheck == 0 and get research ARTEFACT_HAND_FISTING available == variable RESEARCH_AVAILABILITY_RESEARCHED
            begin dialogue
				eject good spirit
				eject evil spirit
                //Ooh, you've just activated something called Forcing.
                say "BW2T_SCRIPT_GENERIC_PHYSTING_ACTIVATED_10"
                wait until read
                //Yeah, and it looks neat.
                say "BW2T_SCRIPT_GENERIC_PHYSTING_ACTIVATED_20"
                wait until read
                //It is. To do it, you hold down the Action button, while within your area of influence.
                say "BW2T_SCRIPT_GENERIC_PHYSTING_ACTIVATED_30"
                wait until read
                //You have to hold it down over no object or person. After a moment the Hand will go into Forcing mode.
                say "BW2T_SCRIPT_GENERIC_PHYSTING_ACTIVATED_40"
                wait until read
                //Then you keep it held down and move the Hand into things. That way you can push them around!
                say "BW2T_SCRIPT_GENERIC_PHYSTING_ACTIVATED_50"
                wait until read
				send good spirit home
				send evil spirit home
			end dialogue
            HandForcingCheck = 1
        end if

        if MultipickupCheck == 0 and get research ARTEFACT_HAND_MULTIPICKUP available == variable RESEARCH_AVAILABILITY_RESEARCHED
            begin dialogue
				eject good spirit
                //You used multi-pick up, Leader! You're amazingly advanced, you know!
				say "BW2T_SCRIPT_01FINAL_ADVISORS_ELOI_40"
				wait until read
				send good spirit home
			end dialogue
            MultipickupCheck = 1
        end if

        if TempleCheck == 0 and get number of type HOUSE ABODE_NUMBER_TEMPLE in L3GreekTown min built 1 > 0
            begin dialogue
				eject good spirit
                //Hooray! This Temple means we've got a much more excellent Town.
                say "BW2T_SCRIPT_03FINAL_BUILDTABTUTORIAL_502"
				wait until read
                //The Temple is a glorious building where villagers come to pray to you.
                say "BW2T_SCRIPT_03FINAL_BUILDTABTUTORIAL_500"
				wait until read
                //This is the first step to spreading your message of peace, and uniting all the peoples of this land.
				say "BW2T_SCRIPT_03FINAL_BUILDTABTUTORIAL_690"
				wait until read
				send good spirit home
			end dialogue
            TempleCheck = 1
        end if

        if ArmoryCheck == 0 and get number of type HOUSE ABODE_NUMBER_MELEE_ARMOURY in L3GreekTown min built 1 > 0
            begin dialogue
				eject evil spirit
                //Yay! We got an Armory! We can now recruit warriors.
                say "BW2T_SCRIPT_03FINAL_BUILDTABTUTORIAL_505"
				wait until read
                //Remember what happened to our people? If we had a big enough Army, no one could push us around!
                say "BW2T_SCRIPT_03FINAL_BUILDTABTUTORIAL_450"
				wait until read
                //And with warriors we could take over and slaughter the people of that Town.
				say "BW2T_SCRIPT_03FINAL_BUILDTABTUTORIAL_506"
				wait until read
				send evil spirit home
			end dialogue
            ArmoryCheck = 1
        end if

        if ArmoryCheck == 1 and TempleCheck == 1 and BothReady == 0
            begin dialogue
				eject good spirit
                //Remember, Leader, to keep making improvements to your Town. They need to grow and get more impressive!
                say "BW2T_SCRIPT_03FINAL_ADVISORS_ARMY_TUT_190"
                wait until read
				eject evil spirit
                //Or you could get a load of Platoons together and start breaking some bones out there!
                say "BW2T_SCRIPT_03FINAL_ADVISORS_ARMY_TUT_200"
                wait until read
                //You can do both good and evil acts throughout your journey but each will have an effect on everything around you.
                say "BW2T_SCRIPT_03FINAL_BUILDTABTUTORIAL_540"
                wait until read
				send good spirit home
				send evil spirit home
			end dialogue
            BothReady = 1
        end if

        if ArmyCheck == 0 and get number of platoon warriors belonging to player 0 > 0
            begin dialogue
				eject evil spirit
                //Look at that! We got ourselves a combat-ready Platoon of fighting men! Whoo!
				say "BW2T_SCRIPT_03FINAL_ADVISORS_ARMY_TUT_90"
				wait until read
                //Make sure your fighting men have enough to eat, Boss. They need food to be the best of the best, remember!
                say "BW2T_SCRIPT_03FINAL_ADVISORS_ARMY_TUT_160"
				wait until read
				send evil spirit home
			end dialogue
            ArmyCheck = 1
        end if

        if BuildRoad == 0 and RT_RoadStat > pastroadtotal
            begin dialogue
				eject good spirit
                //With a little planning your road network can be used as a template for your town.
				say "BW2T_SCRIPT_03FINAL_ADVISORS_TUT_759"
				wait until read
				send good spirit home
			end dialogue
            BuildRoad = 1
        end if

    end while
end script AdvisorCommentary

begin script ProgressCommentary

EvilPoints = 0
GoodPoints = 0
CurrentProgress = 0
ScoreTotal = 0

start
    while L3NumTownsOwnedByPlayer != 4
		if ScoreTotal < MigrationOrConquest
			ScoreTotal++
			if GoodPoints == 0
           		begin dialogue
					eject good spirit
					//Look. Those people have seen our Temple.
					say "BW2T_SCRIPT_03FINAL_PDMRON_PICKUP122"
					wait until read
					//They're so impressed by it, they want to migrate to our Town!
					say "BW2T_SCRIPT_03FINAL_PDMRON_PICKUP123"
					wait until read
					send good spirit home
				end dialogue
				GoodPoints++
			elsif GoodPoints == 1
           		begin dialogue
					eject evil spirit
					//Ah, I've heard enough about good cities. What you have to know, Boss, is that war is the way to win.
					say "BW2T_SCRIPT_03FINAL_ADVISORS_ARMY_TUT_10"
					wait 1 second
					eject good spirit
					wait until read
					//Mine is. More people survive to follow us.
					say "BW2T_SCRIPT_03FINAL_PLAYTHROUGH29_350"
					wait until read
					//My way is best. 
					say "BW2T_SCRIPT_03FINAL_PLAYTHROUGH29_340"
					wait until read
					send good spirit home
					send evil spirit home
				end dialogue
				GoodPoints++
			else
           		begin dialogue
					eject good spirit
					//The people from this Town will want to migrate to us and join us!
					say "BW2T_SCRIPT_03FINAL_BUILDTABTUTORIAL_503"
					wait until read
					//We're travelling the path of the righteous. Good!
					say "BW2T_SCRIPT_GENERIC_HAND_BECOMES_GOOD"
					wait until read
					send good spirit home
				end dialogue
			end if
		elsif ScoreTotal > MigrationOrConquest
			ScoreTotal--
			if EvilPoints == 0
           		begin dialogue
					eject evil spirit
					//They won! Our guys did it!
					say "BW2T_SCRIPT_GENERIC_MELEE_UNIT_WINS_FIGHT"
					wait until read
					//Nice one boss! Eh?
					say "BW2T_SCRIPT_03FINAL_PATERNITY_SUIT_30"
					wait until read
					send evil spirit home
				end dialogue
				EvilPoints++
			elsif EvilPoints == 1
           		begin dialogue
					eject good spirit
					//Goodness me this is terrible. There must be a better way
					say "BW2T_SCRIPT_03FINAL_FAMILY_INTRO_40"
					wait until read
					eject evil spirit
					//Yeah, this is setting my evil antennae tingling.
					say "BW2T_SCRIPT_03FINAL_FAMILY_INTRO_50"
					wait until read
					send evil spirit home
					send good spirit home
				end dialogue
				EvilPoints++
			else
           		begin dialogue
					eject evil spirit
					//Wow! You took the Town Center! We rule!
					say "BW2T_SCRIPT_GENERIC_FIRST_TOWN_TAKEOVER"
					wait until read
					//I'm proud of you, Boss. You took care of that!
					say "BW2T_SCRIPT_03FINAL_PATERNITY_SUIT_90"
					wait until read
					send evil spirit home
				end dialogue
			end if
		end if
    end while
end script ProgressCommentary

begin script ProcessObjectives

FoodCheck = 0
WoodCheck = 0
OreCheck = 0
HousesCheck = 0
TempleCheck = 0
ArmoryCheck = 0
CountToTermination = 6

start

	while CountToTermination > 0
        if FoodCheck == 0
			if get resource RESOURCE_TYPE_FOOD in TUT_StoragePit >= 2000
				set player 0 objective TRIBUTE_OBJECTIVE_LAND_12 status to TRIBUTE_OBJECTIVE_STATE_COMPLETE
				FoodCheck = 1
				CountToTermination--
			else 
				set player 0 objective TRIBUTE_OBJECTIVE_LAND_12 value get resource RESOURCE_TYPE_FOOD in TUT_StoragePit
        	end if
        end if


        if WoodCheck == 0
			if get resource RESOURCE_TYPE_WOOD in TUT_StoragePit >= 2000
			set player 0 objective TRIBUTE_OBJECTIVE_LAND_13 status to TRIBUTE_OBJECTIVE_STATE_COMPLETE
            WoodCheck = 1
			CountToTermination--
			else 
				set player 0 objective TRIBUTE_OBJECTIVE_LAND_13 value get resource RESOURCE_TYPE_WOOD in TUT_StoragePit
        	end if
        end if

        if OreCheck == 0
			if get resource RESOURCE_TYPE_ORE in TUT_StoragePit >= 2000
			set player 0 objective TRIBUTE_OBJECTIVE_LAND_14 status to TRIBUTE_OBJECTIVE_STATE_COMPLETE
            OreCheck = 1
			CountToTermination--
			else 
				set player 0 objective TRIBUTE_OBJECTIVE_LAND_14 value get resource RESOURCE_TYPE_ORE in TUT_StoragePit
        	end if
        end if

        if HousesCheck == 0
			if get number of built ABODE_NUMBER_C in L3GreekTown >= 12
			set player 0 objective TRIBUTE_OBJECTIVE_LAND_15 status to TRIBUTE_OBJECTIVE_STATE_COMPLETE
            HousesCheck = 1
			CountToTermination--
			else 
				set player 0 objective TRIBUTE_OBJECTIVE_LAND_15 value get number of built ABODE_NUMBER_C in L3GreekTown
        	end if
        end if

        if TempleCheck == 0 and get number of type HOUSE ABODE_NUMBER_TEMPLE in L3GreekTown min built 1 > 0
			set player 0 objective TRIBUTE_OBJECTIVE_LAND_16 status to TRIBUTE_OBJECTIVE_STATE_COMPLETE
            TempleCheck = 1
			CountToTermination--
        end if

        if ArmoryCheck == 0 and get number of type HOUSE ABODE_NUMBER_MELEE_ARMOURY in L3GreekTown min built 1 > 0
			set player 0 objective TRIBUTE_OBJECTIVE_LAND_17 status to TRIBUTE_OBJECTIVE_STATE_COMPLETE
            ArmoryCheck = 1
			CountToTermination--
        end if
	end while
end script ProcessObjectives